/******************* (C) COPYRIGHT 2022 CHU WEI TENG ***********************************************
**
**------------------ File Info ---------------------------------------------------------------------
** File name:      dwin_adapt.h
** modified Date:  2022-05-10
** Last Version:   V1.0
** Descriptions: 
** 
**------------------ Modfication  log --------------------------------------------------------------
** Date       Who            Rev        Comments
----------------------------------------------------------------------------------------------------
   22/05/10  chuwt@qq.com    V1.00      created

****************************************************************************************************/
#ifndef __DWIN_ADAPT_H__
#define __DWIN_ADAPT_H__
#include "dwin_types_def.h"

/* Public define-----------------------------------------------------------------------------------*/
#define DWIN_FREE(ptr)    \
  {                       \
    dwin_free((void*)ptr);\
    ptr = NULL;           \
  }
/* Public typedef----------------------------------------------------------------------------------*/

/* Public function---------------------------------------------------------------------------------*/         
void * dwin_malloc(uint32_t size);
void   dwin_free(void* ptr);

void* dwin_lock_create(void);
ret_t dwin_lock_free(void* lock);
ret_t dwin_lock(void* lock);
ret_t dwin_unlock(void* lock);

void dwin_delay(uint32_t delay);

uint16_t dwin_uart_recv(void * buf);
uint16_t dwin_uart_send(void * buf, uint16_t size);

#endif
